package com.itheima.exceptions;

import com.itheima.enums.MsgCode;

/**
 * @Description: 异常抛出类
 * @Date :2019-09-07 10:02
 * @Author : yuan_he_song
 */
public class ThrowException {
    public static void cast(MsgCode msgCode){
        throw new CustomException(msgCode);
    }

    public static void main(String[] args) {
        /**
         * 生成6位随机数字 (Math.random()*9+1)*100000)
         * 生成5位随机数字 (Math.random()*9+1)*10000)
         * 生成4位随机数字 (Math.random()*9+1)*1000)
         */
        System.out.println((int)((Math.random()*9+1)*100000));
    }
}
